print("""
-----------------------------------------------------------------
          欢迎来到嗲文为你亲自编写的计算器！你值得拥有！
          版权：嗲文儿
          版本：1.0（正在努力改进！莫催莫催！）
          开发时间：2025.3.26
          本计算器支持加减乘除等多种运算，包好用的！
          版权所有，侵权必纠！
          适度使用，不要依赖本计算器，要不然中高考包寄的！
          严禁未满14岁小登使用！
------------------------------------------------------------------
""")
import math
def Csum(num1,num2):
    return num1+num2
def Csub(num1,num2):
    return num1-num2
def Cmulti(num1,num2):
    return num1*num2
def CDiv(num1,num2):
    if num2==0:
        print("除数不能为零")
        return 0
    return num1/num2
def logab(a,b):
    return math.log(a,b)
def pow(num1,num2):
    result=1
    for i in range(num2):
        result*=num1
    return result
def mod(num1,num2):
    return num1%num2

flag=True

while flag:
    x=input("请问需要复数（1）运算、实数（2）运算还是三角函数（3）运算？\n")
    if x=="1":
        num1 = complex(input("请输入一个数："))
        num2 = complex(input("请输入另一个数："))
        choice = input("请输入您的选择（+-*/）：")
        if choice == "+":
            print("num1", choice, "num2=", Csum(num1, num2))
        elif choice == "-":
            print("num1", choice, "num2=", Csub(num1, num2))
        elif choice == "*":
            print("num1", choice, "num2=", Cmulti(num1, num2))
        elif choice == "/":
            print("num1", choice, "num2=", CDiv(num1, num2))
        else:
            print("请输入正确的符号！")

    elif x=="2" :
        num1=int(input("请输入一个数："))
        num2=int(input("请输入另一个数："))
        choice =input("请输入您的选择（+ - * / log pow mod）：")
        if choice=="+":
            print("num1",choice,"num2=",Csum(num1,num2))
        elif choice=="-":
            print("num1",choice,"num2=",Csub(num1,num2))
        elif choice=="*":
            print("num1",choice,"num2=",Cmulti(num1,num2))
        elif choice=="/":
            print("num1",choice,"num2=",CDiv(num1,num2))
        elif choice=="log":
            print("log以",num2,"为底",num1,"的对数=",logab(num1,num2))
        elif choice == "pow":
            print(num1,"的",num2,"次方=", pow(num1,num2))
        elif choice == "mod":
            print(num1,"对",num2,"取余=", mod(num1,num2))
        else :
            print("请输入正确的符号！")
    elif x=="3":
        num3 = int(input("请输入角度："))
        choice2=input("请输入您的选择（sin,cos,tan)")
        anglerad=math.radians(num3)
        if choice2=="sin":
            sin_value = math.sin(anglerad)
            print(sin_value)
        elif choice2=="cos":
            cos_value = math.cos(anglerad)
            print(cos_value)
        elif choice2=="tan":
            if num3==90 :
                print("输入有误！")
            else:
                tan_value = math.tan(anglerad)
                print(tan_value)
        else:
            print("请输入正确的选择！")
    conti=input("是否继续？Y/N")
    if conti=="Y":
        flag=True
    elif conti=="N":
        flag=False
        print("感谢您的使用，期待下一次更好的见面")